﻿using Microsoft.Extensions.Logging;

namespace LoggerDemo
{
    public class OrderJob
    {
        private readonly ILogger<OrderJob> _logger;

        public OrderJob(ILogger<OrderJob> logger)
        {
            _logger = logger;
        }

        public void Execute()
        {
            _logger.LogInformation("OrderJob Started at {dateTime}", DateTime.UtcNow);
            //Business Logic START
            //Business logic END
            _logger.LogInformation("OrderJob Ended at {dateTime}", DateTime.UtcNow);
        }
    }
}
